#!/bin/bash

webResponse=$(curl -s -o /dev/null -w "%{http_code}" -X GET "https://www.mirror.aliyuncs.com")

#if [ $webResponse !=  200 ] ; then
      #echo "Unable to access external network, please check network configuration";
      #exit;
#fi

if [ ! -d /home/gonsin/venus/files ]; then
   mkdir -p /home/gonsin/venus/files
fi

cp -r images/* /home/gonsin/venus/files/

docker-compose down --rmi all
docker-compose build
docker-compose up -d